package com.ruoyi.recycleshop.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.recycle.dto.MerchantBillRecordQueryDTO;
import com.ruoyi.recycle.vo.BillRecordVO;
import com.ruoyi.recycleshop.service.CashRegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/bill")
@Api(tags = "我的账单")
@RestController
public class BillController extends BaseController {
    @Autowired
    private CashRegisterService cashRegisterService;

    @PostMapping("/billRecord")
    @ApiOperation("账单记录")
    public R<BillRecordVO> billRecord(@RequestBody MerchantBillRecordQueryDTO queryDTO) {
        return R.ok(cashRegisterService.billRecord(queryDTO));
    }
}
